<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="CommentEditor.ascx.cs" Inherits="Impact.Web.Controls.CommentEditor" %>

<div class="comment_editor">
    <table>
        <tr>
            <td>Name:</td>
            <td><asp:TextBox ID="name" runat="server" /></td>
            <td><asp:RequiredFieldValidator ID="nameRequired" ValidationGroup="commentEditor" ControlToValidate="name" ErrorMessage="Please enter your name." runat="server" /></td>
        </tr>
        <tr>
            <td>Website:</td>
            <td><asp:TextBox ID="website" runat="server" /></td>
            <td><asp:RegularExpressionValidator ID="websiteValitor" ControlToValidate="website" ValidationGroup="commentEditor" 
                    ErrorMessage="Please enter a valid URL in the form: http://www.example.com"
                    ValidationExpression="^(http(s?)\:\/\/|~/|/)([\w]+:\w+@)?([a-zA-Z]{1}([\w\-]+\.)+([\w]{2,5}))(:[\d]{1,5})?((/?\w+/)+|/?)(\w+\.[\w]{3,4})?((\?\w+=\w+)?(&\w+=\w+)*)?" 
                    runat="server" /></td>
        </tr>
        <tr>
            <td colspan="3"><asp:TextBox ID="body" TextMode="MultiLine" CssClass="textArea" runat="server" /></td>
        </tr>
        <tr>
            <td colspan="3"><asp:RequiredFieldValidator ID="bodyRequired" ControlToValidate="body" ValidationGroup="commentEditor" 
                                ErrorMessage="Please enter at least some text." runat="server" /></td>
        </tr>
        <tr>
            <td colspan="3"><asp:Button ID="commentSubmit" Text="Send" OnCommand="CommentSubmitCommand" 
                CssClass="commentSubmitButton" ValidationGroup="commentEditor" runat="server" /></td>
        </tr>
    </table>
    
    <impact:InvisibleCaptcha ID="captcha" ValidationGroup="commentEditor" ErrorMessage="captcha failed" runat="server"></impact:InvisibleCaptcha>
    
</div>